import java.math.BigDecimal;
import java.util.Scanner;

public class BigdeCimal {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        BigDecimal result = BigDecimal.ONE;
        if(n<0){
            System.out.println("不支持负数");
            return;
        }
        for(int i=1;i<=n;i++){
            result=result.multiply(BigDecimal.valueOf(i));//valueOf(i)：把i转换为高精度类型
        }
        System.out.println(n+"!="+result);
    }
    public static void main1(String[] args) {
        BigDecimal a = new BigDecimal("1.30");
        BigDecimal b = new BigDecimal("2.00");
        BigDecimal addRet = a.add(b);
        BigDecimal subRet = a.subtract(b);
        BigDecimal mulRet = a.multiply(b);
        BigDecimal divRet = a.divide(b, 2, BigDecimal.ROUND_HALF_UP);//向上保留两位小数
        System.out.println(addRet);//加
        System.out.println(subRet);//减
        System.out.println(mulRet);//乘
        System.out.println(divRet);//除
    }
}
